from django.db import models

# Create your models here.

class User(models.Model):
    user_id = models.CharField(primary_key=True, max_length=20)  # 主键用户id，这是系统生成的
    user_name = models.CharField(max_length=40, verbose_name="用户名")  # 用户名
    user_mobile = models.CharField(max_length=11, null=True,
                                   blank=True, verbose_name="电话号码")  # 用户号码
    user_email = models.EmailField(max_length=50, verbose_name="邮箱")
    password = models.CharField(max_length=20, default="")

    class Meta:
        verbose_name = "用户信息"
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.user_name
